﻿/*
 * RssItem
 * 
 * See http://cyber.law.harvard.edu/rss/rss.html
 * 
 */

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Serialization;

namespace SNSpirit.Domain.Rss
{
    [Serializable]
    [XmlRoot(ElementName = "rssItem", Namespace = DomainUtillity.Namespace)]
    public abstract class RssItem : DomainEntity
    {
        /// <summary>
        /// Title
        /// </summary>
        [XmlAttribute(AttributeName = "title", Namespace = DomainUtillity.Namespace)]
        public string Title { get; set; }
        /// <summary>
        /// Link
        /// </summary>
        [XmlAttribute(AttributeName = "link", Namespace = DomainUtillity.Namespace)]
        public string Link { get; set; }
        /// <summary>
        /// Description
        /// </summary>
        [XmlElement(ElementName = "description", Namespace = DomainUtillity.Namespace)]
        public object Description { get; set; }
        /// <summary>
        /// author
        /// </summary>
        [XmlAttribute(AttributeName = "author", Namespace = DomainUtillity.Namespace)]
        public string Author { get; set; }
        /// <summary>
        /// category
        /// </summary>
        [XmlElement(ElementName = "category", Namespace = DomainUtillity.Namespace)]
        public RssCategory Category { get; set; }
        /// <summary>
        /// Comment Page Uri
        /// </summary>
        [XmlAttribute(AttributeName = "comments", Namespace = DomainUtillity.Namespace)]
        public Uri Comments { get; set; }
        /// <summary>
        /// Media element
        /// </summary>
        [XmlElement(ElementName = "enclosure", Namespace = DomainUtillity.Namespace)]
        public RssEnclosure Enclosure { get; set; }
        /// <summary>
        /// A string that uniquely identifies the item
        /// </summary>
        [XmlElement(ElementName = "guid", Namespace = DomainUtillity.Namespace)]
        public RssGuid Guid { get; set; }
        /// <summary>
        /// Publish Time
        /// </summary>
        [XmlAttribute(AttributeName = "publishTime", Namespace = DomainUtillity.Namespace)]
        public DateTime? PublishTime { get; set; }
        /// <summary>
        /// Item Source
        /// </summary>
        [XmlElement(ElementName = "source", Namespace = DomainUtillity.Namespace)]
        public RssItemSource Source { get; set; }

    }
}
